package com.github.data_manage.util

import cn.dev33.satoken.stp.StpUtil
import com.github.data_manage.dao.UserDao
import com.github.data_manage.domain.po.User
import org.springframework.stereotype.Component

@Component
class AuthContextHolder(
    private val userDao: UserDao
) {

    fun currentUser(): User {
        return userDao.findById(StpUtil.getLoginIdAsInt()).get()
    }

}
